//package com.pega.eprescription.activity;
//
//import java.util.ArrayList;
//
//import com.pega.eprescription.PillListAdapter;
//import com.pega.eprescription.R;
//import com.pega.eprescription.database.manager.DatabaseManager;
//import com.pega.eprescription.database.model.Pill;
//import com.pega.eprescription.database.model.Prescription;
//import com.pega.eprescription.utils.Utils;
//
//import android.app.Activity;
//import android.os.Bundle;
//import android.widget.ListView;
//import android.widget.TextView;
//
//public class CurrentPrescription extends Activity {
//	@Override
//	protected void onCreate(Bundle savedInstanceState) {
//		super.onCreate(savedInstanceState);
//		setContentView(R.layout.current_presciption);
//		
////		Prescription pres = new Prescription("abc", true, Utils.sharedInstance().getCurrentDate(), "9:00", "11:00", "19:00");
////		int id  = DatabaseManager.getInstance(this).addPrescriptionRecord(pres);
////		Pill pill = new Pill(id, 20, 20	, 1, 1, 1, "abc", "GTH"	);
////		DatabaseManager.getInstance(this).addPillRecord(pill);
//		
//		Prescription currentPrescription = DatabaseManager.getInstance(getApplicationContext()).getCurrentPrescription();
//		if(currentPrescription==null){
//			//back to 
//			finish();
//		}else{
//			TextView prescriptionName = (TextView)findViewById(R.id.tenbenh);
//			prescriptionName.setText(currentPrescription.getNamePre());
//			
//			TextView prescriptionDay = (TextView)findViewById(R.id.ngaybenh);
//			prescriptionDay.setText(currentPrescription.getStartDate().toString());
//			
//			
//			
//			ArrayList<Pill> allPill= DatabaseManager.getInstance(getApplicationContext()).getAllPillOfPrescription(currentPrescription);
//			PillListAdapter adapter= new PillListAdapter(getApplicationContext(), allPill);
//			ListView listView = (ListView) findViewById(R.id.listview);
//			listView.setAdapter(adapter);
//		}
//	}
//
//	
//}
